package com.jxl.coreplay.net
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.net.NetConnection;
	import flash.net.Responder;

	public class ProgressiveConnection extends EventDispatcher implements INetConnection
	{
		
		protected var _netConnection:NetConnection;
		
		public function ProgressiveConnection():void
		{
			super();
			
			_netConnection = new NetConnection();
			_netConnection.connect(null);
		}
		
		public function addHeader(operation:String, mustUnderstand:Boolean=false, param:Object=null):void {}
		public function call(command:String, responder:Responder, ...args):void {}
		
		public function close():void
		{
			_netConnection.close();
		}
		
		public function connect(url:String, ...args):void {}
		
		public function destroy():void
		{
			_netConnection.close();
			_netConnection = null;
		}
		
		public function get client():Object
		{
			return _netConnection.client;
		}
		
		public function set client(value:Object):void
		{
			_netConnection.client = value;
		}
		
		public function get connected():Boolean
		{
			return _netConnection.connected;
		}
		
		public function get connectedProxyType():String
		{
			return _netConnection.connectedProxyType;
		}
		
		public function get netConnection():NetConnection
		{
			return _netConnection;
		}
		
		public function get objectEncoding():uint
		{
			return _netConnection.objectEncoding;
		}
		
		public function set objectEncoding(value:uint):void
		{
			_netConnection.objectEncoding = value;
		}
		
		public function get proxyType():String
		{
			return _netConnection.proxyType;
		}
		
		public function set proxyType(value:String):void
		{
			_netConnection.proxyType = value;
		}
		
		public function get uri():String
		{
			return _netConnection.uri;
		}
		
		public function get usingTLS():Boolean
		{
			return _netConnection.usingTLS;
		}
		
		
	}
}